#!/bin/bash # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Desktop Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description - Script to check if the logged in user have admin privilege # Configuration - COMPUTER UserName=$(id -un) if groups $UserName | grep -q -w admin; then echo "$UserName Is admin"; else echo "$UserName Not admin"; fi